package com.xci.platform.auth.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.xci.platform.core.Constant;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统参数
 */
@Data
public class ParamEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 参数主键
     */
    @NotBlank(message = "参数主键不能为空")
    @Size(min = 1, max = 50, message = "参数主键不能超过50个字符")
    @ExcelIgnore
    private String id;

    /**
     * 参数编码
     */
    @NotBlank(message = "参数编码不能为空")
    @Size(min = 1, max = 50, message = "参数编码不能超过50个字符")
    @Excel(name = "参数编码")
    private String code;

    /**
     * 参数名称
     */
    @NotBlank(message = "参数名称不能为空")
    @Size(min = 1, max = 50, message = "参数名称不能超过50个字符")
    @Excel(name = "参数名称")
    private String name;

    /**
     * 参数名称简拼
     */
    @Size(min = 0, max = 50, message = "参数名称简拼不能超过50个字符")
    @ExcelIgnore
    private String spell;

    /**
     * 参数值
     */
    @Excel(name = "参数值")
    private String value;

    /**
     * 参数分类主键
     */
    @Size(min = 0, max = 50, message = "参数分类主键不能超过50个字符")
    @ExcelIgnore
    private String categoryId;

    /**
     * 参数分类名称
     */
    @Size(min = 0, max = 50, message = "参数分类名称不能超过50个字符")
    @Excel(name = "参数分类")
    private String categoryName;

    /**
     * 操作用户主键
     */
    @ExcelIgnore
    private String operateUserId;

    /**
     * 操作用户
     */
    @Excel(name = "操作用户")
    private String operateUserName;

    /**
     * 操作日期
     */
    @Excel(name = "操作日期", width = 20d, exportFormat = Constant.DefaultDateTimePattern)
    private Date operateDateTime;

    /**
     * 备注
     */
    @Size(min = 0, max = 2000, message = "备注不能超过2000个字符")
    @Excel(name = "备注")
    private String remark;
}
